package dlg.code.composite.model;

import dlg.code.composite.service.IFilter;

import java.util.List;

public class TreeNode {

    private Long id;
    private Long parentId;
    private String v;// 节点数据
    private String decisionType;// 判断类型
    private boolean leaf;// 是否叶节点
    List<TreeNode> childList;// 子节点
    private IFilter condition;
    private Long targetId;

    public TreeNode(Long id, Long parentId, String v, String decisionType, boolean leaf, List<TreeNode> childList, IFilter condition, Long targetId) {
        this.id = id;
        this.parentId = parentId;
        this.v = v;
        this.decisionType = decisionType;
        this.leaf = leaf;
        this.childList = childList;
        this.condition = condition;
        this.targetId = targetId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getV() {
        return v;
    }

    public void setV(String v) {
        this.v = v;
    }

    public String getDecisionType() {
        return decisionType;
    }

    public void setDecisionType(String decisionType) {
        this.decisionType = decisionType;
    }

    public boolean isLeaf() {
        return leaf;
    }

    public void setLeaf(boolean leaf) {
        this.leaf = leaf;
    }

    public List<TreeNode> getChildList() {
        return childList;
    }

    public void setChildList(List<TreeNode> childList) {
        this.childList = childList;
    }

    public IFilter getCondition() {
        return condition;
    }

    public void setCondition(IFilter condition) {
        this.condition = condition;
    }

    public Long getTargetId() {
        return targetId;
    }

    public void setTargetId(Long targetId) {
        this.targetId = targetId;
    }
}
